<ion-header>
  <ion-toolbar>
      <ion-buttons slot="start" (click)="gotohome()">
          <ion-icon name="arrow-back"></ion-icon>
      </ion-buttons>
    <ion-title>scroll</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
    <ion-button (click)="toggleInfiniteScroll()" expand="block">
      Toggle Infinite Scroll
    </ion-button>
  
    <ion-list>
      <ion-item *ngFor="let item of list; index as i" >
         <ion-label>Item {{i}}</ion-label>
      </ion-item>
    </ion-list>
  
    <ion-infinite-scroll threshold="10px" (ionInfinite)="loadData($event)">
      <ion-infinite-scroll-content
        loadingSpinner="bubbles"
        loadingText="Loading more data...">
      </ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ion-content>
